package com.uni.controllers;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.uni.db.GenericService;
import com.uni.domain.User;

@Controller
public class GroupViewList {
	
    @Autowired
    @Qualifier("groupService")
    private GenericService<User> groupService;

    @RequestMapping("/groupList.htm")
    public ModelMap studentListHandler() {
        return new ModelMap("groups", groupService.listAll());
    }
}
